All Questions
Tagged with angularjsdesign-patterns
16 questions
1vote
1answer
234views
Design Patterns for drawing a custom graph in a webapp
I am building a web application which is meant to help display prices of products. The web-app is centered around showing prices in a custom bar chart. I am thinking it should be composed of a Model ...
11votes
4answers
18kviews
Better ways than traditional polling methods
I'm currently in a AngularJS/Javascript environment. Currently the application using the polling method (i.e, to retrieve new data from server in a fixed amount of seconds). This is quite taxing ...
4votes
1answer
980views
Communication between Angular directives and their parent controller
I'm trying to provide a convention, or standard, for a parent controller to communicate with a directive in Angular. Basically the directive will have a "settings" object containing callbacks and ...
0votes
2answers
176views
AngularJS controller definition
I'm beginning using AngularJS (v1) framework, and after browsing good practices I found those examples (from this page https://github.com/johnpapa/angular-styleguide/tree/master/a1), like : /* ...
3votes
4answers
782views
Unit of Work AngularJS
I am writing an application in Angular JS (1.5), and I need to be able to track a model for changes (updates/deletes/additions). For example, I have an ng-model that holds an array of user pets. This ...
1vote
1answer
2kviews
JavaScript & AngularJs Modules Implementation technique and structure
So Im building an app and I'm trying to implement the structure of the app so that its robust and scalable in future. My app is mostly divided into JavaScript Modules (revealing pattern): // filter....
3votes
1answer
1kviews
Could a view call a function of the model directly?
this is a fundamental question about MVC (in particular using AngularJS) and I've found similar questions here, but not the exact same problem: Could the view call a function of the model, or should ...
3votes
2answers
302views
Is it a good idea to have separate UI components make their own webservice calls?
I have few UI components in an angularjs web-application. Each display data based upon same input. One shows stats which are calculated on the basis of a time period. Other shows a chart of daily ...
4votes
1answer
2kviews
When to use Prototypes & the correct usage of Prototypes ( Javascript )
I have been programming in Javascript for a while and I am quite comfortable with it. And I know the basic concept of prototypes and I have also used them a few times. But one thing I can't figure out ...
1vote
1answer
487views
Angular Architecture
I have been developing a few prototype apps in Angular, with various backends, including firebase and php/mysql. I'm pretty sure I'm not using a good organization pattern for development because of a ...
1vote
3answers
679views
Design pattern for multiple companies in AngularJS
We are on the verge of launching v3 of our in-house product. v2 was written completely in AngularJS and V3 will be the same, but written completely in Typescript. We have a few customers that have ...
1vote
1answer
88views
Is having a parent controller to manage a set of tabbed sections an anti-pattern for an angular application?
A lot of times, I have long forms that I divide into multiple tabbed sections. Each section is managed by it's own controller and there is a parent controller that manages the whole view. I use ui-...
3votes
2answers
1kviews
Why don't we completely de-couple frontend JS frameworks and backend APIs? [closed]
Whenever we implement a frontend framework in the likes of Backbone, AngularJS etc. there's an integration process involved with the backend technologies like NodeJS, Rails, Yii etc. (like setting up ...
35votes
6answers
7kviews
Progressive Enhancement vs. Single Page Apps
I just got back from a conference in Boston called An Event Apart. A really popular theme amongst the speakers was the idea of progressive enhancement - a site's content should go in the HTML, and ...
60votes
2answers
29kviews
Communication between nested directives
There seem to be quite a few ways of communicating between directives. Say you have nested directives, where the inner directives must communicate something to the outer (e.g. it's been chosen by the ...